
<div id="main-content"> <!-- Main Content Section with everything -->			
	<!-- Page Head -->						
	<div class="clear"></div> <!-- End .clear -->
	
	<div class="content-box"><!-- Start Content Box -->
		
		<div class="content-box-header">
			
			<h3><?php echo $query?'修改':'新建'?>管理员</h3>					
			<div class="clear"></div>
			
		</div> <!-- End .content-box-header -->
		
		<div class="content-box-content">
			<div >
			
				<form action="<?php echo base_url()?>users/execute" method="post">
						<input type='hidden' name='id' value='<?php echo $query?$query['id']:''?>'>						
						<p>
							<label>名称：</label>
								<input class="text-input small-input" type="text" id="small-input" name="name" value='<?php echo $query?$query['name']:''?>' /> 
								
						</p>
						<p>
							<label>密码：</label>
								<input class="text-input small-input" type="password" id="small-input" name="pass" value='<?php echo $query?$query['pass']:''?>' /> 
								
						</p>
						<?php if($this->session->userdata['id'] == '1'):?>
						<p>
							<label>权限：</label>
							<?php foreach(sidebar_options() as $key=>$value):?>
								<p>
									<h3><?php  echo $value[$key];?></h3>
									<?php foreach($value as $k=>$v):?>
										<input type='checkbox' name='permission[]' value='<?php echo $k;?>' <?php if($query){echo in_array($k,$query['permission'])?'checked':'';}?> /><?php echo $v;?>
									<?php endforeach;?>
								</p>
							<?php endforeach;?>
						</p>
						<?php endif;?>
						<p>
							<input class="button" type="submit" value="Submit" />
							<input class="button back" type="button" value="Back" />
						</p>							
					<div class="clear"></div><!-- End .clear -->
					
				</form>						
			</div>					
		</div> <!-- End .content-box-content -->
		
	</div> <!-- End .content-box -->
	<div class="clear"></div>			
</div> <!-- End #main-content -->	
